package com.ihr360.payroll.service.payroll.mock.core;

import com.ihr360.expr.ExprArray;
import com.ihr360.job.core.item.support.MapMapItemWriter;
import com.ihr360.job.core.item.support.OneShotItemWriter;
import com.ihr360.payroll.calc.StaffSalaryCalcPeriod;
import com.ihr360.payroll.config.TaxDivisionEntity;
import com.ihr360.payroll.model.dto.attendance.plan.AttendancePlan;
import com.ihr360.payroll.model.dto.salary.meta.SalaryField;
import com.ihr360.payroll.service.salarytasklet.expr.engine.SalaryDependencyEngine;
import com.ihr360.payroll.service.salarytasklet.model.SimplePayrollConfig;
import com.ihr360.payroll.service.salarytasklet.step.SalaryCalcContext;
import com.ihr360.sharedservice.model.WorkingCalendar;
import org.springframework.data.util.Pair;

import java.util.Date;
import java.util.Map;

public interface PersonalSalaryCalcCapable {

    public SalaryCalcContext buildContext() throws Exception;

    public void processSalaryFieldDependency(SalaryCalcContext context) throws Exception;

    public void processAttendancePlanDependency(SalaryCalcContext context) throws Exception;

    public SimplePayrollConfig buildPayrollConfig();

    public OneShotItemWriter<Map<String, SalaryField>> salaryFieldWriter(SalaryCalcContext context) throws Exception;

    public OneShotItemWriter<SalaryDependencyEngine> dependencyEngineHolder() throws Exception;

    public OneShotItemWriter<AttendancePlan> attendancePlanHolder() throws Exception;

    public MapMapItemWriter<String, Map<String, ExprArray>> taxTableHolder() throws Exception;

    public TaxDivisionEntity ZHCNTaxDivision();

    public Pair<String, Map<String, ExprArray>> buildAnnualBonusTaxTable() throws Exception;

    public Pair<String, Map<String, ExprArray>> buildAnnualBonusTaxTable4Foreign() throws Exception;

    public Pair<String, Map<String, ExprArray>> buildTaxTable() throws Exception;

    public Pair<String, Map<String, ExprArray>> buildForeignSalaryTaxTable() throws Exception;

    public StaffSalaryCalcPeriod buildSalaryCalcPeriod();

    public OneShotItemWriter<WorkingCalendar> workingCalendarHolderOfMarch() throws Exception;

    public WorkingCalendar buildWorkingCalendar201803();

    public void fieldAssertEquals(String field, String expected);

    public AttendancePlan getAttendanceHelper();

    public Date salaryPeriodMonth();

    public String staffId();

    public String staffName();

}
